<template>
  <div>
    <!-- <div class="breviary clearfix" v-if="rowData.dataset">
      <p class="breviary-title">数据集</p>
      <p class="breviary-detail">
        {{ rowData.dataset && rowData.dataset.name }}
      </p>
    </div> -->
    <div class="breviary clearfix" v-if="rowData.node_group_list">
      <p class="breviary-title">资源组</p>
      <p class="breviary-detail">
        <span class="sml-font" v-for="(e, i) in rowData.node_group_list" :key="i">
          {{ `${e.type && e.type == 1 ? '主节点资源': '子节点资源'}:` }}
          {{ e.product && e.product.name }}
        </span>
      </p>
    </div>
    <div class="breviary clearfix" v-if="rowData.node_group_list">
      <p class="breviary-title">环境</p>
      <p class="breviary-detail">
        <span class="sml-font" v-for="(e, i) in rowData.node_group_list" :key="i">
          {{ `${e.type && e.type == 1 ? '主节点环境': '子节点环境'}:` }}
          {{ e.image && e.image.name }}
        </span>
      </p>
    </div>
    <div class="breviary clearfix" v-if="rowData.product">
      <p class="breviary-title">资源</p>
      <p class="breviary-detail">
        <span class="sml-font">{{ rowData.product && rowData.product.name }}</span>
      </p>
    </div>
    <div class="breviary clearfix" v-if="rowData.image">
      <p class="breviary-title">环境</p>
      <p class="breviary-detail">
        <span class="sml-font">{{ rowData.image && rowData.image.name }}</span>
      </p>
    </div>
    <div class="breviary clearfix" v-if="rowData.update_user">
      <p class="breviary-title">更新人</p>
      <p class="breviary-detail">
        <span class="sml-font">{{ rowData.update_user && rowData.update_user.nick_name || rowData.update_user && rowData.update_user.username }}</span>
      </p>
    </div>
  </div>
</template>

<script>

export default {
  name: "rowData",
  props: ['row'],
  data() {
    return{
      rowData: {}
    }
  },
  watch: {
    row(val) {
      this.rowData = val
    }
  },
  methods: {
    
  },
  mounted () {
    this.rowData = this.row
  }
}
</script>

<style lang="less" scoped>
.breviary{
  padding: 5px 0;
  .breviary-title{
    float: left;
    width: 60px;
  }
  .breviary-detail{
    float: left;
  }
  .sml-font{
    display: block;
    font-size: 12px;
    // color: #999;
  }
}
</style>